//
//@File    :	16.3_hangman.cpp
//@Time    :	2022/03/25 17:22:36
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	some string methods
//

#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
#include <cctype>

using std::string;
const int NUM=26;
const string wordlist[NUM]={
    "apiary","beetle","ceereal","danger","ensign",
    "florid","garage","health","insult","jackal",
    "keeper","loaner","manage","nonce","useful",
    "valid","whence","xenon","yearn","zippy",
}

int main(){
    using std::cout;
    using std::cin;
    using std::tolower;
    using std::endl;
    std::srand(std::time(0));
    char play;
    cout<<"Will you play a word game?<y/n>";
    cin>>play;
    play=tolower(play);
    while (play=='y')
    {
        string target = wordlist[std::rand()%NUM];
        
    }
    
}